<template>
  <div>{{ data }}</div>
</template>

<script>
export default {
  data () {
    return {
      data: 3
    }
  },
  mounted () {
    this.time()
  },
  methods: {
    time () {
      debugger
      setInterval(() => {
        // eslint-disable-next-line no-constant-condition
        if ((this.data === 0)) return
        this.data -= 1
      }, 1000)
    }
  }
}
</script>
